import Vue from 'vue'
import Router from 'vue-router'
import PageHome from '@/components/PageHemo.vue'
import ViewShow from '@/components/ViewShow.vue'
import Regist from '@/components/Regist.vue'
import HeadMess from '@/components/HeadMess.vue'
import Login from '@/components/Login.vue'
import Contact from '@/components/Contact.vue'
import My from '@/components/My.vue'
import Write from '@/components/admin/Write'
import AdminInfo from '@/components/admin/AdminInfo.vue'
import AdminUser from '@/components/admin/AdminUser.vue'
import AdminMenu from '@/components/admin/AdminMenu.vue'
import AdminCarousel from '@/components/admin/AdminCarousel.vue'
import AdminAddUpdate from '@/components/admin/AdminAddUpdate.vue'
import AdminUpdateUser from '@/components/admin/AdminUpdateUser.vue'

import VueRouter from "vue-router";
Vue.use(VueRouter);
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'PageHome',
      component: PageHome
    },
    // {
    //   // 重定向到首页 
    //   path: '*', redirect: '/'
    // },
    {
      path: '/ViewShow',
      name: 'ViewShow',
      component: ViewShow
    }
    ,
    {
      path: '/Regist',
      name: 'Regist',
      component: Regist
    },
    {
      path: '/Login',
      name: 'Login',
      component: Login
    },
    {
      path: '/HeadMess',
      name: 'HeadMess',
      component: HeadMess
    },
    {
      path: '/Contact',
      name: 'Contact',
      component: Contact
    },
    {
      path: '/My',
      name: 'My',
      component: My
    },
    {
      path: '/Write',
      name: 'Write',
      component: Write
    },
    {
      path: '/AdminInfo',
      name: 'AdminInfo',
      component: AdminInfo
    },
    {
      path: '/AdminMenu',
      name: 'AdminMenu',
      component: AdminMenu
    },
    {
      path: '/AdminUser',
      name: 'AdminUser',
      component: AdminUser
    },
    {
      path: '/AdminCarousel',
      name: 'AdminCarousel',
      component: AdminCarousel
    },
    {
      path: '/AdminAddUpdate',
      name: 'AdminAddUpdate',
      component: AdminAddUpdate
    },
    {
      path: '/AdminUpdateUser',
      name: 'AdminUpdateUser',
      component: AdminUpdateUser
    }

  ]
})



